package com.maywide.jdp.system.vo;

import java.io.Serializable;

import com.google.gson.annotations.Expose;

/**
 * 模块树对象类
 * 
 * @author luoyang
 * @version 1.0
 * @since JDK1.6
 */
public class ModuleTree implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 2506325681327091436L;

	/**
	 * ID
	 */
	@Expose
	protected String id = null;
	
	/**
	 * 编码
	 */
	@Expose
	protected String code = null;
	
	/**
	 * 名称
	 */
	@Expose
	protected String name = null;
	
	/**
	 * 描述
	 */
	@Expose
	protected String description = null;
	
	/**
	 * 可用
	 */
	@Expose
	protected boolean active = true;
	
	/**
	 * 文本
	 */
	@Expose
	protected String text = null;

	/**
	 * parentID
	 */
	@Expose
	protected String parentID = null;
	
	/**
	 * 路径
	 */
	@Expose
	protected String path = null;
	
	/**
	 * 是否叶子
	 */
	@Expose
	protected boolean leaf = false;
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	/**
	 * @param text the text to set
	 */
	public void setText(String text) {
		this.text = text;
	}

	/**
	 * @return the text
	 */
	public String getText() {
		return text;
	}

	/**
	 * @param parentID the parentID to set
	 */
	public void setParentID(String parentID) {
		this.parentID = parentID;
	}

	/**
	 * @return the parentID
	 */
	public String getParentID() {
		return parentID;
	}

	/**
	 * @param path the path to set
	 */
	public void setPath(String path) {
		this.path = path;
	}

	/**
	 * @return the path
	 */
	public String getPath() {
		return path;
	}

	/**
	 * @param leaf the leaf to set
	 */
	public void setLeaf(boolean leaf) {
		this.leaf = leaf;
	}

	/**
	 * @return the leaf
	 */
	public boolean isLeaf() {
		return leaf;
	}

	@Override
	public boolean equals(Object obj) {
		if(obj instanceof ModuleTree) {
			if(((ModuleTree)obj).getId().equals(id))
				return true;
		}
		return false;
	}
}
